{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "#importing the libraries\n",
    "import numpy as np\n",
    "import pandas as pd\n",
    "import matplotlib.pyplot as plt\n",
    "%matplotlib inline"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "#importing the dataset\n",
    "dataset=pd.read_csv('Position_Salaries.csv')\n",
    "X=dataset.iloc[:,1:2].values\n",
    "y=dataset.iloc[:,2].values\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "DecisionTreeRegressor(criterion='mse', max_depth=None, max_features=None,\n",
       "                      max_leaf_nodes=None, min_impurity_decrease=0.0,\n",
       "                      min_impurity_split=None, min_samples_leaf=1,\n",
       "                      min_samples_split=2, min_weight_fraction_leaf=0.0,\n",
       "                      presort=False, random_state=0, splitter='best')"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#fitting the decision tree regression model to the dataset\n",
    "from sklearn.tree import DecisionTreeRegressor\n",
    "regressor=DecisionTreeRegressor(random_state=0)\n",
    "regressor.fit(X,y)\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "ename": "NameError",
     "evalue": "name 'array' is not defined",
     "output_type": "error",
     "traceback": [
      "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[1;31mNameError\u001b[0m                                 Traceback (most recent call last)",
      "\u001b[1;32m<ipython-input-6-31ce106e9c67>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m\u001b[0m\n\u001b[1;32m----> 1\u001b[1;33m \u001b[0my_pred\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mregressor\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mpredict\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0marray\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m[\u001b[0m\u001b[1;33m[\u001b[0m\u001b[1;36m6.5\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m",
      "\u001b[1;31mNameError\u001b[0m: name 'array' is not defined"
     ]
    }
   ],
   "source": [
    "y_pred = regressor.predict(array([[6.5]]))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "ename": "NameError",
     "evalue": "name 'y_pred' is not defined",
     "output_type": "error",
     "traceback": [
      "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[1;31mNameError\u001b[0m                                 Traceback (most recent call last)",
      "\u001b[1;32m<ipython-input-8-3aaf935e6aec>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m\u001b[0m\n\u001b[1;32m----> 1\u001b[1;33m \u001b[0my_pred\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m",
      "\u001b[1;31mNameError\u001b[0m: name 'y_pred' is not defined"
     ]
    }
   ],
   "source": [
    "y_pred"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 55,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(900,)"
      ]
     },
     "execution_count": 55,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#visualising the decision tree regression result(for higher resolution and smoother curves)\n",
    "X_grid=np.arange(min(X),max(X),0.01)\n",
    "X_grid.shape\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 56,
   "metadata": {},
   "outputs": [],
   "source": [
    "#reshaping X_grid from 1-D array to 2-D array\n",
    "X_grid=X_grid.reshape(len(X_grid),1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 58,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAaEAAAEWCAYAAADPZygPAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvOIA7rQAAIABJREFUeJzt3XucXEWd9/HPNwm3ACEBAoaEZPAhqwLrikQIoMjFxQBiYFcEzJIsixtFQBFfjwZYRXHjwoKi+CjuLPd1uAnsgsh1URRELgERDBGJISQjAQIhFzNgbr/nj6oxPZOeS/f0zJme+b5fr3l1d506VdVnZvrXVadOHUUEZmZmRRhSdAPMzGzwchAyM7PCOAiZmVlhHITMzKwwDkJmZlYYByEzMyuMg5DVhKTdJfWr+f6ShkkKSQ3dzP8BSfMl/UnSRySNkfSQpFWSLsx5/lrSo73Z7pL23CtpWhd5hub2ju+LNllbkmZIuqsG5YyR9KykzWvRrnriIDQI5A+p1p8Nkt4sed3ph1wnZTZLOrjGTa20DR/K76f1vTRL+koPivxX4JKI2CYi7gA+DbwEjIiIL5XkuaikDc0lx3O5pF9KmilJPWgHABFxeEQ0dZFnfW7vop7W115/+B33dxFxTUQcUYNylgAPAaf0vFX1xUFoEMgfUttExDbAIuDokrRNPuQkDev7VlZtUcl7+yBwqqSPVFnWBGBuu9fPRr6iW9I44P3Aj9vtd0Suv4EUoM4BGqtsQ93o7b+TWpdfB3/XTcCnim5EX3MQMiT9q6QbJV0vaRXwD5J+KOmrJXk+JGlhfn49sAtwV+4BnFWSb3r+Br1U0qwO6nu/pD9KGlKSdpykJ/PzyZKelLRS0iuSLipXTnsR8QfgV8AeHdT7kKR/LHn9SUkP5OcLgfEl7+m/gGnAOfn1wcDhwOMR8ecO6l8eEf8DnAicIumduewtJX1L0uL8fr4vacuSdvydpKfy+50v6fD27ZX0V5J+IWmFpNckXZf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+NJ+TGka62+zcnOVG4CLSzd26k9+sx7yKtpmZFcbDcWZmVhgHITMzK4yDkJmZFcZByMzMCuMgZGZmhXEQMjOzwjgImZlZYf4/Pp+rPa3Mjs0AAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.scatter(X,y,color='red')\n",
    "plt.plot(X_grid,regressor.predict(X_grid),color='blue')\n",
    "plt.title('Truth vs Bluff(Decision tree regression)')\n",
    "plt.xlabel('Position level')\n",
    "plt.ylabel('Salary')\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
